|  |   | 
   | FireMonkey Architecture - Felix John COLIBRI. |  1 - FireMonkey Uml Class DiagramLooking at the source code, we came up with the following Firemonkey Class Diagram:   
 
 
 2 - The Component hierarchyHere is a sketch of the organization: tPersistent
  tGradient
tBrush : Color, Kind, Style
tFont : Family, Size
tComponent
  tFmxObject
  purpose :
  the container (ChildrenCount, Children), with the streaming and style
tAnimation
tEffect
tBrushObject
tBitmapObject
tControl
  purpose :
  fScene : iScene with the Canvas
Position, Scale, RotationAngle
key and mouse handling
tShape
  purpose :
  Fill and Stroke for the brush and the pen
tLine
tRectangle
tEllipse
tPath
tText
  purpose
  used as a style element, like tButton
Text, Font, alignment
tStyledControl
  purpose :
 
StyleLookup to extract the styles
help support
tPanel
tTextControl
  purpose :
  the controls with some text
tLabel
tButton ...
tStatusBar ...
tTrack ...
tEdit
  purpose :
  Text, along with the clipboard and StartPos, SelText ...
tScrollBox
tImage
tPaintBox
tLayout
 
 In other words :
  tComponent, as usual, still manages ownership, meaning that destroying a
tComponent will first destroy the component's owned sub-components (in Components[])
tFmxObject is the root of the FireMonkey hierarchy. It handles Parent /
Children trees. Any tFmxObject can be a container for any other tFmxObject. Basic streaming starts at this level. tFmxObject.FindStyleResource is used to find the style of a tStyledObject
(there is also a Fmx.Types.FindStyleResource global method which looks at the default StyleBook)
the tControl (that is the Fmx.tControl) is concerned with Form Controls
 
it has a Canvas
manages Position, Scale etc
handles the keyboard and the mouse
two descendent branches
  "Primitive Controls", which contain all properties for their display.
Those can be used like usual controls (you can draw rectangles, display a string using a tText). By default they have no effects or animation
"Styled Controls" which automatically have a style child. This child
usually starts with a tLayout (for grouping the style elements) which contains "Primitive" style controls, like tRectangle, tText, or tEffect, tAnimation. Those controls have default styles, but we can
assign another style or one of our styles using the StyleLookup property
 
 
 
 3 - Other ArticlesHere are some references :
.]our other articles about FireMonkey / Delphi XE2:
  FireMonkey StylesFelix COLIBRI - 11 sept 2011 - 56 K, 2 .ZIP sources, 21 Fig.
  changing styles for all or for some components, the Style Designer, content of a .STYLE file, setting then StyleLookup property, predefined styles.
 FireMonkey Animations tutorialJohn COLIBRI - 26 Sept 2011 - 56 K, 3 sources .ZIP, 16 Fig
 
selecting the Property to animate, the start and end values, the interpolation law, the speed and repetition. 3d animations. Vcl or FireMonkey ? (in French)
 Delphi XE2 LiveBindings TutorialJohn Colibri - 30 Sept 2011 - 54K, 6 sample codes, 43 figs
 
how to setup the SourceComponent and the ControlComponent and expression, tBindingsList, the bindings Editor, using several sources with tBindingScope, building bindings by code,
LiveBindings and databases. Far more flexible than the Vcl db_xxx, but with the risks of late binding (in French)
Delphi LiveBindings SpelunkingFelix COLIBRI - 3 Oct 2011 - 114 K, 4 .ZIP sources, 8 Fig
 
analysis of the architecture of the Delphi LiveBindings : how the tBindingExpression compiles a String expression to build an environment referencing objects which can be evaluated to fill
component properties. Dump of the pseudo code and UML Class Diagram of the LiveBinding architecture
Simple FireMonkey Object InspectorFelix COLIBRI - 10 Oct 2011 - 52 K, 2 .ZIP source, 5 Fig
 building a FireMonkey Object Inspector which presents the components
of the Form and displays their property names an values and allows the user to modify them at runtime
 
  FireMonkey Style Explorer : create
tFmxObjects from their class name, create their default style, display their child style herarchy in a tTreeView, present each style element in an Object Inspector which can be used to change the property values.
 
A look at the 3D side of FireMonkeyEric GRANGE - 6 Oct 2011
  Details about Scope, Scene Graph, Materials and Textures, Meshes,
Cadencing
  
 
 
 4 - The authorFelix John COLIBRI works at the Pascal Institute. Starting with Pascal in 1979, he then became involved with Object
Oriented Programming, Delphi, Sql, Tcp/Ip, Html, UML. Currently, he is mainly active in the area of custom software
development (new projects, maintenance, audits, BDE migration, Delphi Xe_n migrations, refactoring), Delphi Consulting and Delph training. His web site features tutorials, technical papers about programming with full downloadable source
code, and the description and calendar of forthcoming Delphi, FireBird, Tcp/IP, Web Services, OOP  /  UML, Design Patterns, Unit Testing training sessions.
 |  |